home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Amiga Amateur Radio User Group / AARUG UK #70 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].zip / AARUG UK #70 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].adf / RTPatch.doc < prev    next >
Text File  |  1994-04-16  |  19KB  |  426 lines

  1.  
  2.                       *********************************
  3.  
  4.                          RTPatch 1.3
  5.  
  6.                          The ReqTools Patcher
  7.  
  8.                          (c) 1992-1994 Nico François
  9.  
  10.                       *********************************
  11.  
  12.  
  13. Preface
  14. =======
  15.  
  16. The programs and files in this distribution are freely distributable, but are
  17. also copyright (c) Nico François.  They may be freely distributed as long as
  18. no more than a nominal fee is charged to cover time and copying costs.
  19.    No commercial usage is permitted without written permission from the
  20. author.  Everything in this distribution must be kept together, in original
  21. unmodified form.
  22.    The above is generally known as freeware.
  23.  
  24.    If you have suggestions or remarks about this program, or if you find
  25. any bugs, please let me know.
  26.  
  27.    Contacting the author:
  28.  
  29.      Fido:     2:292/603.10 (Nico Francois)
  30.  
  31.      Internet: nico@augfl.be
  32.  
  33.      Mail:     Nico François
  34.                Corbielaan 13
  35.                B-3060 Bertem
  36.                BELGIUM
  37.  
  38.    If you can please use e-mail.  That way you'll stand a much better chance
  39. of getting a reply quickly.
  40.  
  41.  
  42. Contents
  43. ========
  44.  
  45. 1. Introduction
  46.  
  47. 2. Usage
  48.  
  49. 3. Compatibility
  50.  
  51. 4. Controlling RTPatch
  52.  
  53.  
  54. 1. Introduction
  55. ===============
  56.  
  57.    RTPatch is a small program that will re-route functions from most popular
  58. requester libraries to ReqTools.  Libraries currently supported are Arp, Req
  59. and Asl.  RTPatch will also patch some functions in Intuition to give you
  60. improved system requesters.
  61.  
  62.    The patches RTPatch makes are these:
  63.  
  64.      o Intuition  : AutoRequest and EasyRequest (on 2.0) are patched so
  65.                     normal system requesters, like 'Insert Disk...'
  66.                     requesters, will be replaced by ReqTools EZRequesters.
  67.                     They will appear near the mouse pointer and respond to
  68.                     many keyboard shortcuts.  On 2.0 OpenScreenTagList() is
  69.                     also patched to always open a new-look 3D screen.  This
  70.                     will make for example CygnusEd 2.12 open a nice new-look
  71.                     screen.  You may also ask RTPatch to patch OpenScreen()
  72.                     to open _all_ screens with a 3D look.  Beware however
  73.                     that this makes a lot of old programs look ugly!
  74.      o req.library: File requester, font requester, palette requester,
  75.                     string requester and integer requester are replaced by
  76.                     ReqTools requesters.
  77.      o arp.library: File requester is replaced by ReqTools file requester.
  78.      o asl.library: Currently only file requester is replaced by ReqTools
  79.                     file requester.  Font and screen mode requesters are not
  80.                     patched yet.
  81.  
  82.    RTPatch uses an intelligent patch mechanism.  It will only patch a
  83. library when it is actually opened.  This means that if you never use the
  84. arp.library (for example) it will not be patched and, more importantly, it
  85. will not unnecessaryly be loaded into memory!  If you do run a program that
  86. uses Arp and you quit it, it will close Arp.  RTPatch will then allow the
  87. patched Arp to be expunged from memory.  If Arp is reloaded again later it
  88. will be re-patched.  Note that RTPatch patches exec.library/OpenLibrary() and
  89. exec.library/OldOpenLibrary() to accomplish all this.
  90.  
  91.    RTPatch is a 100% assembly program, for maximum efficiency.  It only
  92. takes about 5K of memory once installed (excluding memory occupied by
  93. reqtools.library).  It uses *NO* processor time while installed.
  94.  
  95.  
  96. 2. Usage
  97. ========
  98.  
  99.    RTPatch can be used from Workbench and from the Shell (CLI).
  100.  
  101.    Shell usage:
  102.    ~~~~~~~~~~~~
  103.      RTPatch 1.3 © 1992-1994 Nico François
  104.      Usage: RTPatch [NOREQ] [NOASL] [NOARP] [NOINTUITION] [OPENSCRPATCH]
  105.                     [NOOPENSCRTAGPATCH] [NOFILEREQPATCH] [IGNOREHEIGHT]
  106.  
  107.    Explanation of options:
  108.  
  109.       NOREQ             : Do not patch req.library.
  110.       NOASL             : Do not patch asl.library.
  111.       NOARP             : Do not patch arp.library.
  112.       NOINTUITION       : Do not patch intuition.library.
  113.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  114.                           screens will open with a 3D look.  Only use this
  115.                           option on Kickstart 2.0 and higher!
  116.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  117.                           intuition.library.
  118.       NOFILEREQPATCH    : Do not patch any file requester functions.
  119.       IGNOREHEIGHT      : Ignore height setting of Asl file requester.
  120.  
  121.    Workbench usage:
  122.    ~~~~~~~~~~~~~~~~
  123.    RTPatch recognizes following tooltypes:
  124.  
  125.       NOREQ             : Do not patch req.library.
  126.       NOASL             : Do not patch asl.library.
  127.       NOARP             : Do not patch arp.library.
  128.       NOINTUITION       : Do not patch intuition.library.
  129.       OPENSCRPATCH      : Patch OpenScreen() in intuition.library so _all_
  130.                           screens will open with a 3D look.  Only use this
  131.                           tooltype on Kickstart 2.0 and higher!
  132.       NOOPENSCRTAGPATCH : Do not patch OpenScreenTagList() in
  133.                           intuition.library.
  134.       NOFILEREQPATCH    : Do not patch any file requester functions.
  135.       IGNOREHEIGHT      : Ignore height setting of Asl file requester.
  136.       QUIET             : Don't open requester informing patches have been
  137.                           installed.  Set this tooltype if you intend to drag
  138.                           RTPatch to your WbStartup drawer.
  139.  
  140. NOTE: Run RTPatch when *NO* program has req.library, asl.library or
  141.       arp.library open!  RTPatch will complain if one of these libraries
  142.       is in use and will refuse to install or remove patches.  Running
  143.       RTPatch in your user-startup or from your WbStartup should be ok.
  144.  
  145. WARNING: Asl V38 (distributed with Workbench 2.1) always keeps its library
  146.          open count at 0.  It does this so ramlib will always call its
  147.          Expunge() function when memory is low.  This does however mean
  148.          RTPatch cannot see if this library is in use or not.  So you must
  149.          be very careful not to install or remove RTPatch when you have a
  150.          program running that uses Asl.  If you are still using Workbench 1.3
  151.          or 2.0 there is no problem.
  152.  
  153.  
  154. 3. Compatibility
  155. ================
  156.  
  157.    RTPatch supports all basic requester functions and options.  Other
  158. supported things that are worth mentioning:
  159.  
  160.      arp.library (V39)
  161.      ~~~~~~~~~~~~~~~~~
  162.      o File callback function (FRF_DoWildFunc).  The A4 global data register
  163.        is valid when this callback function is called (documented feature).
  164.      o Message callback function (FRF_DoMsgFunc) for requesters which share
  165.        their IDCMP port with the parent window.
  166.      o Save mode (FRF_DoColor flag).
  167.      o Shared IDCMP with parent window or new IDCMP (FRF_NewIDCMP flag).
  168.      o 'Empty filename is ok' behaviour is supported.
  169.  
  170.      asl.library (V36/V38-V40)
  171.      ~~~~~~~~~~~~~~~~~~~~~~~~~
  172.      o File callback function/hook (FRF_DOWILDFUNC and ASLFR_FilterFunc tag).
  173.        The A4 global data register is valid when this callback function is
  174.        called for maximum compatibility (undocumented feature of Asl V36).
  175.      o Intuition message callback function/hook (FRF_DOMSGFUNC and
  176.        ASLFR_IntuiMsgFunc tag) for requesters with shared IDCMP.
  177.      o Multi-selection (FRB_DOMULTISELECT flag or ASLFR_DoMultiSelect tag).
  178.      o Directory requester, no files. (FRF_DRAWERSONLY flag or
  179.        ASLFR_DrawersOnly tag).
  180.      o Save mode (FRF_DOSAVEMODE flag or ASLFR_DoSaveMode tag).
  181.      o Shared IDCMP with parent window or new IDCMP (FRF_PRIVATEIDCMP flag
  182.        or ALSFR_PrivateIDCMP tag).
  183.      o Putting to sleep of parent window (ASLFR_SleepWindow tag).
  184.      o Font for requester (ASLFR_TextAttr tag).  Note that if a proportional
  185.        font is supplied it will be rejected by the ReqTools file requester.
  186.      o Pattern gadget (FRF_DOPATTERNS flag or ASLFR_DoPatterns tag).
  187.      o 'Empty filename is ok' behaviour is supported to ensures compatibility
  188.        with e.g. AssignX, PageStream 2.2 and no doubt many other programs.
  189.      o Undocumented fields in file requester structure are filled in, so even
  190.        "dirty" programs will work.
  191.      o Accept and reject patterns (ASLFR_AcceptPattern/ASLFR_RejectPattern).
  192.  
  193.      req.library (V2)
  194.      ~~~~~~~~~~~~~~~~
  195.      o Multi-selection.
  196.      o Buffers for file and font requester.
  197.      o Directory requester (no files).
  198.      o Save mode (FRQSAVINGM flag).
  199.      o Minimum and maximum value of GetLong() requester.
  200.  
  201.      Additional enhancements
  202.      ~~~~~~~~~~~~~~~~~~~~~~~
  203.      o Buffered directories for Asl file requester.
  204.  
  205.  
  206.      Following things are NOT supported (yet?):
  207.                           ¯¯¯
  208.      arp.library
  209.      ~~~~~~~~~~~
  210.      o FRF_NewWindFunc and FRF_AddGadFunc/FRF_GEventFunc callback functions
  211.        are not called.  As far as I can tell nobody ever used the latter two
  212.        and the former function is certainly not used a lot.
  213.        In short: this should not pose any problems.
  214.  
  215.      asl.library
  216.      ~~~~~~~~~~~
  217.      o ASLFR_InitialWidth and ASLFR_NegativeText tags are ignored.
  218.      o FRB_REJECTICONS flag and ASLFR_RejectIcons tag are ignored.
  219.      o FRB_FILTERDRAWERS flag and ASLFR_FilterDrawers tag are ignored.
  220.  
  221.      req.library
  222.      ~~~~~~~~~~~
  223.      o Timeout and abort mask (req.library requester will be used).
  224.      o freq->frq_Hide is ignored (freq->frq_Show is however supported).
  225.      o TR_KeyMask is not completely supported.  If it is not 0xffff
  226.        (no qualifers) the requester will only respond to Left Amiga V/B.
  227.        This should suffice in most cases however.
  228.  
  229.    If you find any compatibility problems let me know.  Please give a detailed
  230. description of the problem.  Not 'RTPatch doesn't work with NeatProg',
  231. but more like: 'when I do this and this in NeatProg ... doesn't work".
  232.  
  233.  
  234. 4. Controlling RTPatch
  235. ======================
  236.  
  237.    From version 1.1 on RTPatch's message port can be used to control certain
  238. patches from an external program.
  239.  
  240.    The message port is called 'RTPatch.rendezvous' and looks like this:
  241.  
  242.    struct RTPatchPort {
  243.       /* PRIVATE FIELDS */
  244.       struct MsgPort rtport_port;
  245.       ULONG rtport_version;
  246.       /* PUBLIC */
  247.       UWORD rtport_easyreqautocancel;
  248.       UWORD rtport_skipeasyreqpatch;
  249.       UWORD rtport_skipopenscrpatch;
  250.       };
  251.  
  252.    Set the rtport_autocancel field to non-zero to make easy requesters cancel
  253. themselves automatically.  The rtport_skipeasyreqpatch field can be used to
  254. temporarily disable the patch for EasyRequestArgs().  Note that the
  255. rtport_easyreqautocancel field will be ignored if the rtport_skipeasyreqpatch
  256. field is non-zero (TRUE).  RTPatch must have been installed _without_ the
  257. NOINTUITION argument (default).
  258.  
  259.    Set the rtport_skipopenscrpatch field to non-zero to temporarily disable
  260. the OpenScreen() patch.  This will of course only work if the OPENSCRPATCH
  261. argument was used (not the default!).
  262.  
  263.    To change these fields simply do a FindPort() for 'RTPatch.rendezvous' and
  264. change the fields like this:
  265.  
  266.    Forbid();
  267.    if (rtport = (struct RTPatchPort *)FindPort ("RTPatch.rendezvous")) {
  268.       rtport->rtport_easyreqautocancel = TRUE;
  269.       }
  270.    Permit();
  271.    if (!rtport) Message ("RTPatch not found!");
  272.    else Message ("Easy requesters will now be canceled!");
  273.  
  274.    Note that you absolutely _must_ use the Forbid()/Permit() pair since
  275. RTPatch can quit at any time.
  276.  
  277.                                                        Enjoy.
  278.  
  279.  
  280.                                PROGRAM HISTORY:
  281.  
  282. *****************************************************************************
  283. RELEASE 0.9ß
  284.  
  285.     o First BETA release.
  286.  
  287. *****************************************************************************
  288. RELEASE 0.91ß
  289.  
  290.     o Bug fixes: Req GetLong requester no longer returns FALSE when you enter
  291.       the value 0 and Req file requester now properly returns full pathname.
  292.     o Now correctly patches AutoRequest when run on Kickstart 1.2/1.3.
  293.  
  294. *****************************************************************************
  295. RELEASE 1.0
  296.  
  297.     o First "real" release, big improvement over previous beta versions.
  298.     o Fixed some small bugs.
  299.     o Now only patches libraries when they are actually opened.  This saves
  300.       oodles of memory, especially when you never or rarely use certain
  301.       libraries!  Also allows patched libraries to be expunged from memory
  302.       unlike many other patchers.
  303.     o In conjunction with ReqTools V38 empty directories are now allowed for
  304.       improved compatibility.  This makes it e.g. possible to use AssignX.
  305.     o Asl (V36-V38) library is now also patched (file requester only).
  306.     o Command line arguments/icon tooltypes to set some options.
  307.  
  308. *****************************************************************************
  309. RELEASE 1.0a
  310.  
  311.     o ASLFR_AcceptPattern and ASLFR_RejectPattern tags are now supported.
  312.     o Req TextRequest() patch now handles textrequests without gadgets.
  313.       An 'Ok' gadget will be added by RTPatch.
  314.     o Bug fixed: Asl callback hook (filter function) is now only called for
  315.       files, not for directories as well.  The callback hook also makes
  316.       sure the fr_Drawer field of the Asl requester is pointing to the
  317.       current directory (only with ReqTools release 2.0b or higher!).
  318.     o Now allows you to also patch OpenScreen() to force _all_ screens to
  319.       open with a 3D look. This is not default because it makes a lot of old
  320.       programs look ugly.
  321.       WARNING: NOOPENSCRPATCH switch has been changed to NOOPENSCRTAGPATCH!
  322.     o OpenScreenTagList() patch tweeked a bit.
  323.     o On Kickstart 2.0 or higher RTPatch will now set the RNF_WILDSTAR flag
  324.       in the DOS rootnode. This allows you to use '*' as a wildcard.
  325.  
  326. *****************************************************************************
  327. RELEASE 1.0b
  328.  
  329.     o OpenScreenTagList() patch tweeked a bit more :)  Will not force a 3D
  330.       look if no taglist was supplied. Will also leave the picking of the
  331.       pens completely up to Intuition. Patch made more future-compatible :)
  332.     o Bug fix: Arp message callback function didn't work.  This caused TxEd
  333.       Plus 2.2 to crash.  Thanks to Bill Sorensen for reporting this bug.
  334.     o Fixed problem with AutoRequest() and EasyRequest() patches.  Requesters
  335.       weren't opened on the default public screen if the window argument was
  336.       NULL.  They were opened on the screen of the window in pr_WindowPtr.
  337.       Thanks to Roger Nordin for reporting this.
  338.  
  339. *****************************************************************************
  340. RELEASE 1.1
  341.  
  342.     o RTPatch's message port is now documented and allows external program
  343.       to change the behaviour of some patches.  It is now possible to let
  344.       RTPatch automatically cancel easy requesters and to temporarily switch
  345.       off the OpenScreen() patch.
  346.     o Bug fix: OpenScreen() patch now recognizes the NS_EXTENDED flag.
  347.       Fixes problems with DPaint, DirOpus and PowerVisor.
  348.     o Handling of ASLFR_DrawersOnly tag was broken.  Fixed.
  349.     o Fixed bug in AutoRequest() patch (no longer worked on Kickstart 1.3).
  350.     o OpenLibrary() patch rewritten for (hopefully) better compatibility
  351.       with buggy programs.  Now keeps _all_ registers 100% compatible with
  352.       normal OpenLibrary() call.
  353.  
  354. *****************************************************************************
  355. RELEASE 1.1a
  356.  
  357.     o Clears EZREQF_NORETURNKEY for single-button EZRequesters (latest
  358.       release of ReqTools libraries no longer clear this automatically).
  359.  
  360. *****************************************************************************
  361. RELEASE 1.1b
  362.  
  363.     o Now properly initializes the fr_Pattern field of an emulated Asl
  364.       file requester structure.
  365.     o Fixed bug in req.library TextRequest() emulation.  Printf style
  366.       arguments were not correctly emulated.  This does not fix the infamous
  367.       CygnusEd bug that occurs when a search for '%s' fails (for example).
  368.     o Fixed small bug in single-button detection code in req.library
  369.       TextRequest() emulation.
  370.  
  371. *****************************************************************************
  372. RELEASE 1.1c
  373.  
  374.     o OpenLibrary() patch fixed.  Now checks the return code from
  375.       SetFunction() rather than directly peeking into the library's jump
  376.       table. Should work perfectly with SetMan now.
  377.  
  378. *****************************************************************************
  379. RELEASE 1.2
  380.  
  381.     o New argument: 'NOFILEREQPATCH'.  Allows you to switch off the patching
  382.       of all file requester functions.
  383.     o Bug fix: EasyRequestArgs() emulation had a bug in the taglist
  384.       generation.  Amazing this actually worked before ;-)
  385.     o AutoRequest() patch will now check the body text is is passed to
  386.       sniff out possible emulation problems.  In such a case the original
  387.       AutoRequest() is called.  This fixes a problem with the DiskSalv 2
  388.       device info requester.
  389.       
  390. *****************************************************************************
  391. RELEASE 1.3
  392.  
  393.     o ASL Intuition message callback function/hook (FRF_DOMSGFUNC and
  394.       ASLFR_IntuiMsgFunc tags) seems to require filtered Intuition messages
  395.       (GadTools) instead of normal IntuiMessages.  RTPatch now uses
  396.       GT_FilterIMsg() and GT_PostFilterIMsg() in its message callback hook
  397.       emulation to support this strange requirement.  On top of this some
  398.       software (e.g. PhotoWorX) seems to rely on the fr_Drawer and fr_File
  399.       fields to be valid and up-to-date during the execution of the hook.
  400.       In combination with ReqTools 2.2 this will now be the case.
  401.     o New argument: 'IGNOREHEIGHT'.  When this is switch is used RTPatch
  402.       will ignore the height setting for the Asl file requester and will
  403.       always use the default ReqTools setting (as set by the ReqTools
  404.       preferences program).
  405.     o In case of a multiselect ASL requester RTPatch will always fill in
  406.       the fr_File field with the name of the first file that was selected.
  407.       This is not really required, but improves compatibility with Term.
  408.     o Set mp_SigTask of dummy message port to NULL and mp_Flags to PA_IGNORE.
  409.       This is done to avoid all sorts of problems with some system snoopers.
  410.  
  411. *****************************************************************************
  412.  
  413. RTPatch 1.3 written by Nico François (Yes, Nico is my first name :-)
  414.  
  415.  
  416. "Is that you Mo-Dean?
  417.  It's me Mo-Dean
  418.  The Interdimensional outer space being" - The B-52's
  419.  
  420.  
  421. (c) 1992-1994 Nico François
  422.  
  423.                                    //
  424.                        Thanks to \X/ Amiga for being the best computer ever!
  425.  
  426.